clear all 
use "data\out\estsample.dta", clear
g byte PeakxEvent = Peak*EventDay
g byte ShoulderxEvent = shoulder*EventDay

reghdfe lnforbruk Peak PeakxEvent ///
  TPE TNPE TPnextdays TNPnextdays, absorb(maalepktnr dato) cluster(maalepktnr)
est store IV1
estadd ysumm  

reghdfe lnforbruk c.temp##c.temp##c.temp temp_* Peak PeakxEvent ///
  TPE TNPE TPnextdays TNPnextdays, absorb(maalepktnr dato) cluster(maalepktnr)
est store IV2
estadd ysumm  

reghdfe lnforbruk c.temp##c.temp##c.temp temp_* Peak PeakxEvent Peakelcar ///
  TPE TNPE TPnextdays TNPnextdays TPEelcar TNPEelcar TPnextdayselcar TNPnextdayselcar, absorb(maalepktnr dato) cluster(maalepktnr)
est store IV3
estadd ysumm  

reghdfe lnforbruk c.temp##c.temp##c.temp temp_* Peak PeakxEvent ShoulderxEvent shoulder TPE TNPE TPnextdays TNPnextdays TsE, absorb(maalepktnr dato) cluster(maalepktnr)
est store IV4
estadd ysumm  

reghdfe lnforbruk c.temp##c.temp##c.temp temp_* Peak PeakxEvent ShoulderxEvent Peakelcar shoulder shoulderelcar ///
  TPE TNPE TPnextdays TNPnextdays TPEelcar TNPEelcar TPnextdayselcar TNPnextdayselcar TsE TsEelcar, absorb(maalepktnr dato) cluster(maalepktnr)
est store IV5
estadd ysumm  


estout IV1 IV2 IV3 IV4 IV5 using "output\table_C1.txt", replace type ///
  cells(b( fmt(3)) se(par fmt(3)) _star) indicate(temp) mlabels(1 2 3 4 5 6 ) collabels(none) legend ///
  order( TPE TNPE TPnextdays TNPnextdays Peak PeakxEvent ShoulderxEvent TPEelcar TNPEelcar TPnextdayselcar TNPnextdayselcar Peakelcar TsE shoulder TsEelcar shoulderelcar) ///
  varlabels(TPE TP TNPE TNP) starlevels(* 0.10 ** 0.05 *** 0.01) varwidth(26) ///
  stats(ymean r2 N, fmt(3 3 0 0)) style(tex)